﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using SplashScreenTool;
using System.Globalization;
using System.Threading;

namespace SAE
{
    /// <summary> Main program entry point</summary>
    static class Program
    {
        /// <summary> The main entry point for the application. </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            try
            {
                Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
                // Shows splash screen during initialization phase 
                SplashScreen splash = new SplashScreen();
                splash.Show();
                Application.Run(new MainForm(splash));
            }
            catch (Exception ex)
            {
                string msg = ex.Message;
                if (ex.InnerException != null)
                    msg += "\n" + ex.InnerException.Message;
                MessageBox.Show(msg, "Fatal error", MessageBoxButtons.OK, MessageBoxIcon.Error);

            }
        }
    }
}
